$(document).ready(function() {
    var profile;
    ProgramAjaxService.getUserProfile(function(profile_){
        profile = profile_;
        $("#username").val(profile.username);
//        $("#firstname").val();
//        $("#lastname").val();
//        $("#mydate").val();
//        $("#gender").val();
//        $("#city").val();
//        $("#country").val();
        // TODO: once form submission is fixed.. will implement these.
    })
    
    $("#updateBtn").click(function(){
        var title = $("#title").val();
        var firstName = $("#firstname").val();
        var lastName = $("#lastname").val();
        var dob = $("#mydate").val();
        var gender = $("#gender").val();
        var city = $("#city").val();
        var country = $("#country").val();
//        var zipcode = $("");

        alert("updateBtn "+ country +" "+city+" "+gender+" "+dob+" "+lastName+" "+firstName+" "+title);

        ProgramAjaxService.saveUserProfile(title,firstName,lastName,dob,gender,city,country);
    })
    
})